<script setup>
	import {city} from './utils/API.js'
	import{ref}from 'vue'
	import {onLaunch,onShow} from "@dcloudio/uni-app"
	import {storeToRefs} from "pinia";//结构才需要引入
	import {useNavStore} from '@/store/index.js'//引入空间
	import {userStore} from '@/store/user.js'//引入空间
	const navStore = useNavStore()//给空间命名
	const userStores = userStore()//给空间命名
	const appisactive =ref(0)
	onLaunch(()=>{
		console.log('onLaunch');
		navStore.getNavBar()
		navStore.getLocation()
		navStore.getShopCar()
		navStore.orderNoticeNum()
		userStores.getUser()
		userStores.getBalance()
		userStores.carfun()
		// getwhere()
	})
	onShow(()=>{
		console.log('onShow');
	})
	// const cityobj = ref({})
	// const getwhere=async()=> {
	// 	const result = await city()
	// 	if(result.code == 200){
	// 		console.log('11111',result);
	// 		cityobj.value=result.data
	// 	}
	// }
	
</script>

<style>
	page{
		background-color: #f8f8f8;
	}
</style>
